package prototype;

public class PrototypeMain {

	public static void main(String[] args) {
		Agent a = new Agent();
		ForwardBehaviour fb = new ForwardBehaviour(a);
		StopBehaviour sb = new StopBehaviour(a);
		PrintThread pt = new PrintThread(a);

		Thread fbt = new Thread(fb);
		fbt.setDaemon(true);
		Thread sbt = new Thread(sb);
		sbt.setDaemon(true);
		Thread ptt = new Thread(pt);
		ptt.setDaemon(true);

		fbt.start();
		sbt.start();
		ptt.start();

		while (true) {
			fb.release();
			try {
				Thread.sleep((long) 10000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			sb.release();
		}
	}
}
